package org.hzero.order.domain.entity;


import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;
import io.choerodon.mybatis.domain.AuditDomain;

/**
 * @author xiuiqng.Yang-Estelle-양수청
 * @date 2019/8/5 10:35
 */

/**
 * 实体类
 */
@ApiModel("公司信息")
@ModifyAudit
@VersionAudit
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "hodr_company")
@Data
public class Company extends AuditDomain {

    public static final String FIELD_ID = "id";
    public static final String FIELD_CODE = "code";
    public static final String FIELD_NAME = "name";

    @Id
    @GeneratedValue
    private Long companyId;

    @NotBlank
    @Length(max = 60)
    @ApiModelProperty("公司编号")
    private String companyNumber;

    @NotBlank
    @Length(max = 240)
    @ApiModelProperty("公司名称")
    private String companyName;

    @ApiModelProperty("启用标识")
    private Boolean enabledFlag;

}
